\input{mainheader.tex}
\includeonly{chapter01}
\renewcommand{\setflag}{\newif \ifwhole\wholetrue}
% your chapter includes here:
\begin{document}
\include{preface}% preface, copyright and so on
\include{toc} % all kinds of tableofcontents
\include{chapter01}
\include{chapter02}
\include{chapter03}
\include{chapter04}
\include{chapter05}
\include{chapter06}
\include{chapter07}
\include{chapter08}
\include{chapter09}
\include{chapter10}
\include{chapter11}
\include{chapter12}
\include{appendix}
\include{index}%index and glossary
\end{document}
